package com.vim.modules.mall.service.remote;

import com.vim.modules.mall.model.base.CommonPage;
import com.vim.modules.mall.model.base.MallResponseEntity;
import com.vim.modules.mall.model.mallOrder.MallOrderReturnApply;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @作者 Administrator
 * @时间 2020-10-06 14:59
 * @版本 1.0
 */
@Service
@FeignClient(name = "web-gateway", contextId = "remoteMallOrderReturnApplyService", fallback = RemoteMallOrderReturnApplyServiceFallBack.class)
public interface RemoteMallOrderReturnApplyService {

    /**
     * 获取售后列表
     * @param orderId   订单id
     */
    @GetMapping("/adminApi/order/orderReturnApplyList/{orderId}")
    MallResponseEntity<List<MallOrderReturnApply>> orderReturnApplyList(@PathVariable(value = "orderId") Long orderId);

    /**
     * 获取售后列表
     * @param pageNo 当前页码
     * @param pageSize 每页数量
     */
    @GetMapping("/adminApi/order/orderReturnApplyPageList")
    MallResponseEntity<CommonPage<MallOrderReturnApply>> orderReturnApplyPageList(
            @RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo,
            @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize
    );

    /**
     * 获取售后详情
     * @param applyId 售后id
     */
    @GetMapping("/adminApi/order/orderReturnApplyInfo/{applyId}")
    MallResponseEntity<MallOrderReturnApply> orderReturnApplyInfo(@PathVariable(value = "applyId") Long applyId);

}
